home *** CD-ROM | disk | FTP | other *** search
- global gFormat, imageMember
-
- on generateProductPage aPath
- member("comment").text = EMPTY
- thePath = aPath
- if baFileExists(thePath & "code.txt") = 0 then
- alert("No code.txt found in: " & thePath)
- else
- if baFileExists(thePath & "shot.jpg") then
- imageMember.fileName = thePath & "shot.jpg"
- sprite(6).member = imageMember
- end if
- imageMember = member("imagebox")
- pText = getNetText(thePath & "info.txt")
- cText = getNetText(thePath & "code.txt")
- if netDone(pText) then
- textholder = netTextResult(pText)
- header = textholder.line[1]
- member("product_title").text = header
- member("product_header").text = textholder.line[2]
- delete textholder.line[1..3]
- member("product_details").text = textholder
- member("product_details").topSpacing = 0
- member("product_details").fixedLineSpace = 12
- end if
- bCount = 1
- if netDone(cText) then
- codeHolder = netTextResult(cText)
- lH = 400
- lV = 520
- cCount = 1
- repeat with i = 100 to _movie.channel.count
- sprite(i).scriptInstanceList = []
- channel(i).removeScriptedSprite()
- end repeat
- repeat with i = 1 to codeHolder.line.count
- if bCount = 2 then
- lH = 560
- end if
- if bCount > 2 then
- lV = 520
- end if
- if bCount = 3 then
- lH = 400
- end if
- if bCount = 4 then
- lH = 840
- lV = 520
- end if
- case codeHolder.line[i].word[1] of
- "<register>":
- RegTarget = codeHolder.line[i].word[2]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, RegTarget, 100 + cCount, "register")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("register_text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- "<install_PC>":
- InstallTarget = codeHolder.line[i].char[14..codeHolder.line[i].char.count]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, InstallTarget, 100 + cCount, "install_pc")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("Install_PC_text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- "<install_MAC>":
- InstallTarget = codeHolder.line[i].char[15..codeHolder.line[i].char.count]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, InstallTarget, 100 + cCount, "install_mac")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("Install_MAC_text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- "<install>":
- InstallTarget = codeHolder.line[i].char[11..codeHolder.line[i].char.count]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, InstallTarget, 100 + cCount, "install")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("Install_text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- "<folder>":
- FolderTarget = codeHolder.line[i].char[10..codeHolder.line[i].char.count]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, FolderTarget, 100 + cCount, "folder")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("folder_text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- "<format>":
- gFormat = codeHolder.line[i].char[10..codeHolder.line[i].char.count]
- "<comment>":
- gComment = codeHolder.line[i].char[11..codeHolder.line[i].char.count]
- member("comment").text = gComment
- "<Website>":
- WebTarget = codeHolder.line[i].word[2]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, WebTarget, 100 + cCount, "website")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("website_text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- "<local_link>":
- WebTarget = thePath & codeHolder.line[i].word[2..codeHolder.line[i].word.count]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, WebTarget, 100 + cCount, "local_link")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("website_text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- "<Serial>":
- WebTarget = thePath & codeHolder.line[i].word[2..codeHolder.line[i].word.count]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, WebTarget, 100 + cCount, "local_link")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("Serial_Text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- "<Upgrade>":
- WebTarget = codeHolder.line[i].word[2..codeHolder.line[i].word.count]
- cCount = cCount + 1
- bCount = bCount + 1
- channel(100 + cCount).makeScriptedSprite(member("iNSTALLbUTTON"), point(lH, lV))
- add(sprite(100 + cCount).scriptInstanceList, new(script("action_button_rollover"), 1))
- _movie.sendSprite(100 + cCount, #Initialize, WebTarget, 100 + cCount, "website")
- cCount = cCount + 1
- channel(100 + cCount).makeScriptedSprite(member("Upgrade_Text"), point(lH - 40, lV - 11))
- sprite(100 + cCount).ink = 36
- end case
- end repeat
- end if
- end if
- end
-